#include <stdio.h>
#include <iostream>
#include <fstream>
#include "model_man.hpp"

using namespace std;

int main()
{
  int tmp;

//  /* 1 */
//  shooter::basic::speed_t<> v1(0, 0, 1);
//  shooter::basic::speed_t<> v2(1, 0, 0);
//  shooter::basic::speed_t<> v3 = v1 + v2;
////  shooter::basic::point_t<> m1;
////  v3 = m1 + m1;
//  //v3 = v1 + v2;
//  v3 = v1 ^ v2;
//  double d = v1 * v2;
////  std::cout<<v3.x_<<v3.y_<<v3.z_<<endl;
//  std::cout<<"d "<<d<<endl;
//  int val = v1.length();
//  double alpha = v1.alpha();
//  double beta = v1.beta();
//  std::cout<<val<<" "<<alpha<<" "<<beta<<" "<<endl;

  /* 2 */
  shooter::basic::point_t<> m1(0, 0, 1);
  shooter::basic::point_t<> m2(0, 0, -1);
  shooter::basic::line_t<> l1(-2, 0, -2, 1, 0, 1);
  shooter::basic::line_t<> l2(0, -1, 0, 0, 1, 0);

  double d1 = shooter::basic::cal_distance(m1, m2);
  std::cout<<"distance 1:"<<d1<<endl;
  double d2 = shooter::basic::cal_distance(m1, l1);
  std::cout<<"distance 2:"<<d2<<endl;
  double angle1 = shooter::basic::cal_angle(l1, l2);
  std::cout<<"angle 1:"<<angle1<<endl;
  shooter::basic::unit_coor_t<> c1 = m1.coor();
  c1.x_ = 1;
  std::cout<<m1.coor().x_<<endl;
  m1.set_speed(0, 0, 1);
  m1.refresh_coor(1.0);
  std::cout<<m1.coor().x_<<m1.coor().y_<<m1.coor().z_<<endl;
  getchar();

  return 0;
}

